package top.jojoace.CustomAnnotation.todo;

import lombok.SneakyThrows;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import top.jojoace.CustomAnnotation.myAnnotation.MyAnnotation;

@RestController
public class Dothat {

    @SneakyThrows
    @MyAnnotation
    @PostMapping("/todo/{name}")
    public String getTodo(@PathVariable("name") String name){
        System.out.println("业务start。。");
        Thread.sleep(3000);
        System.out.println("业务end。。");
        return "over:"+name;
    }
}
